<?php

class UserLoginAction extends Action {
  public function index() {
    $this->display();
  }

  public function checkVip() {
    $m = M('');
    $sql = "select * from a_vip_key where `key` = '".$_POST['key']."'";
    if ($m->query($sql)) {
      $sql = "insert into a_vip_temp (user_name,`key`,company,type) values ('".$_POST['user_name']."','".$_POST['key']."','".$_POST['company']."',".$_POST['type'].")";
      $m->query($sql);
  
   
            redirect("http://www.ehs.cn/okvip.php");
    }else {
         

      redirect("http://www.ehs.cn/errorvip.php");
    }


  }
}
?>